package com.effectiv.crm.domain;

import java.io.Serializable;
import java.util.Date;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
@Document(collection = "CONTACT")
public class Contact extends AbstractDocument implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	
	@DBRef
	private Account account;
	
	private PickListEntry salutation;
	
	private String firstName;
	
	@NotEmpty
	private String lastName;
	
	@Email
	private String email;
	
	
	@Email
	private String secondaryEmail;
	
	private String phone;
	
	private String mobile;
	
	private String title;
	
	private String department;
	
	private String fax;
	
	private String reportsTo;
	
	private String userType;
	
	private String contactType;
	
	@DateTimeFormat(pattern = "dd/MM/yyyy")
	private Date birthDay;
	
	private boolean donotCall;
	
	private boolean emailOptOut;
	
	private Address mailing;
	
	private Address billing;
	
	private String description;
}
